#ifndef LIBRARY_EXCEPTION_H
#define LIBRARY_EXCEPTION_H

#include <exception>

using namespace std;

class LibraryException : public exception {
public:
	virtual const char* what() const throw() = 0;
};


class MultipleIsbnException : public LibraryException {
	const char* what() const throw() { return "Error : a book with given ISBN already exists";}
};

class MultipleIdException : public LibraryException {
	const char* what() const throw() { return "Error : a borrower with given ID already exists";}
};


class BookNotExistsException : public LibraryException {
	const char* what() const throw() { return "Error : book with given ISBN doesn't exist";}
};

class CantRemoveBookException : public LibraryException {
	const char* what() const throw() { return "Error : can't remove book since it has borrowers";}
};

class BorrowerNotExistsException : public LibraryException {
	const char* what() const throw() { return "Error : borrower with given ID doesn't exist";}
};

class CantRemoveBorrowerException : public LibraryException {
	const char* what() const throw() { return "Error : can't remove borrower since he has lended books";}
};

class CantReturnBookExeption : public LibraryException {
	const char* what() const throw() { return "Error : can't return book since it wasn't lended to this borrower";}
};

class InvalidNumOfCopiesException : public LibraryException {
	const char * what() const throw() { return "Error : invalid number of copies, book was not added";}
};

class InvalidISBNException : public LibraryException {
	const char * what() const throw() { return "Error : invalid ISBN, book was not added";}
};

class InvalidIDException : public LibraryException {
	const char * what() const throw() { return "Error : invalid ID, borrower was not added";}
};

#endif